﻿<%@ Page Title="Ticket" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Ticket.aspx.cs" Inherits="IFD2.Ticket" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <link href="Datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/>

    <form id="form1" runat="server" role="form" class="form-inline" defaultbutton="lbtnQuery">
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
    <div class="container-fluid body-content" style="width:100%;">

    <div class="row">
        <div class="col-sm-2 well well-sm">
            <h5><asp:Literal ID="litTitle" runat="server" meta:resourcekey="tipPageTitle"></asp:Literal></h5>
            <div class="form-group">
                <asp:Label ID="Label1" runat="server" Text="Ticket No.:" meta:resourcekey="TicketNo"></asp:Label>
                <asp:TextBox ID="txtTktNo" runat="server" CssClass="form-control input-sm" Width="100%" MaxLength="20"></asp:TextBox>
            </div>
            <br class="hidden-xs"/><br class="hidden-xs"/>
            <asp:LinkButton ID="lbtnQuery" runat="server" CssClass="form-control input-sm btn-primary text-center" Width="100%" ToolTip="" meta:resourcekey="tipQuery" OnClick="lbtnQuery_Click"> <span class="glyphicon glyphicon-search" style="font-size:large;"></span></asp:LinkButton>
            <p></p><%--没有此行(或&nbsp;)，上面的按钮在手机模式(xs)下，只有上半部可以点击！--%>

            <div class="hidden-xs">
                <div id="myScrollspy" data-spy="affix"><!--data-offset-top="150" data-offset-bottom="100" --><!-- id="myScrollspy"-->
                    <ul class="nav nav-tabs nav-stacked">
                        <li class="active"><a href="#secPaxInfo"><asp:Literal ID="Literal6" meta:resourcekey="PaxInfo" runat="server"></asp:Literal></a></li>
                        <li><a href="#secTripInfo"><asp:Literal ID="Literal7" meta:resourcekey="TripInfo" runat="server"></asp:Literal></a></li>
                        <li><a href="#secValueAddedServices"><asp:Literal ID="Literal8" meta:resourcekey="ValueAddedServices" runat="server"></asp:Literal></a></li>
                        <li><a href="#secNotes"><asp:Literal ID="Literal9" meta:resourcekey="Notes" runat="server"></asp:Literal></a></li>
                    </ul>
                </div>
            </div>
            <asp:HiddenField ID="hidOrderNo" runat="server" />
            <asp:HiddenField ID="hidPaxSn" runat="server" />
        </div>

        <div class="col-sm-10 well well-sm">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="secPaxInfo"><asp:Literal ID="Literal1" runat="server" meta:resourcekey="PaxInfo"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" CellPadding="4" style="min-width:3000px;width:100%;"
                            DataKeyNames="bk_id,pax_sn" DataSourceID="SqlDataSource2" ForeColor="#333333" GridLines="None">
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <RowStyle BackColor="#EFF3FB" />
                            <Columns>
                                <asp:TemplateField HeaderText="PaxName" meta:resourcekey="PaxName">
                                    <ItemTemplate>
                                        <%# Eval("family_name")+"/" + Eval("name") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="EnglishName1" meta:resourcekey="EnglishName1">
                                    <ItemTemplate>
                                        <%# Eval("family_name_en")+"/" + Eval("name_en") %>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="status" HeaderText="status" SortExpression="status"  meta:resourcekey="status1" />
                                <asp:CheckBoxField DataField="hold_inf" HeaderText="hold_inf" SortExpression="hold_inf" meta:resourcekey="hold_inf" Visible="false" />
                                <asp:CheckBoxField DataField="male" HeaderText="male" SortExpression="male"  meta:resourcekey="male1" />
                                <asp:BoundField DataField="age_type" HeaderText="age_type" SortExpression="age_type"  meta:resourcekey="age_type" />
                                <asp:BoundField DataField="nationality" HeaderText="nationality" SortExpression="nationality"  meta:resourcekey="nationality1" />
                                <asp:BoundField DataField="id_type" HeaderText="id_type" SortExpression="id_type"  meta:resourcekey="id_type" />
                                <asp:BoundField DataField="id_no" HeaderText="id_no" SortExpression="id_no"  meta:resourcekey="id_no" />
                                <asp:BoundField DataField="id_expired_date" HeaderText="id_expired_date" SortExpression="id_expired_date"  meta:resourcekey="id_expired_date" DataFormatString="{0:d}" />
                                <asp:BoundField DataField="inf_dob" HeaderText="inf_dob" SortExpression="inf_dob"  meta:resourcekey="inf_dob" />
                                <asp:CheckBoxField DataField="vip" HeaderText="VIP" SortExpression="vip"/>
                                <asp:CheckBoxField DataField="alone_chd" HeaderText="alone_chd" SortExpression="alone_chd" meta:resourcekey="alone_chd" />
                                <asp:BoundField DataField="move_assistant" HeaderText="move_assistant" SortExpression="move_assistant"  meta:resourcekey="move_assistant" />
                                <asp:BoundField DataField="meal" HeaderText="meal" SortExpression="meal"  meta:resourcekey="meal1" />
                                <asp:BoundField DataField="remark" HeaderText="remark" SortExpression="remark"  meta:resourcekey="remark1" />
                                <asp:BoundField DataField="ffp_airline" HeaderText="ffp_airline" SortExpression="ffp_airline"  meta:resourcekey="ffp_airline" />
                                <asp:BoundField DataField="ffp_no" HeaderText="ffp_no" SortExpression="ffp_no"  meta:resourcekey="ffp_no" />
                                <asp:BoundField DataField="pax_value" HeaderText="pax_value" SortExpression="pax_value"  meta:resourcekey="pax_value" />
                                <asp:BoundField DataField="email" HeaderText="email" SortExpression="email"  meta:resourcekey="email1" />
                                <asp:BoundField DataField="mobile_phone" HeaderText="mobile_phone" SortExpression="mobile_phone"  meta:resourcekey="mobile_phone" />
                                <asp:CheckBoxField DataField="need_invoice" HeaderText="need_invoice" SortExpression="need_invoice"  meta:resourcekey="need_invoice" />
                                <asp:BoundField DataField="mail_address" HeaderText="mail_address" SortExpression="mail_address"   meta:resourcekey="mail_address"/>
                                <asp:BoundField DataField="post_code" HeaderText="post_code" SortExpression="post_code"   meta:resourcekey="post_code"/>
                        
                                <asp:BoundField DataField="pay_currency" HeaderText="pay_currency" SortExpression="pay_currency"  meta:resourcekey="pay_currency" />
                                <asp:BoundField DataField="pay_airline" HeaderText="pay_airline" SortExpression="pay_airline"  meta:resourcekey="pay_airline" />
                                <asp:BoundField DataField="pay_office" HeaderText="pay_office" SortExpression="pay_office"  meta:resourcekey="pay_office" />
                                <asp:BoundField DataField="pay_user" HeaderText="pay_user" SortExpression="pay_user"  meta:resourcekey="pay_user" />
                                <asp:BoundField DataField="pay_time" HeaderText="pay_time" SortExpression="pay_time"  meta:resourcekey="pay_time" />
                                <asp:BoundField DataField="expiry" HeaderText="expiry" SortExpression="expiry"  meta:resourcekey="expiry1" />
                
                                <asp:BoundField DataField="invoice_no" HeaderText="invoice_no" SortExpression="invoice_no"  meta:resourcekey="invoice_no" />
                                <asp:BoundField DataField="invoice_user" HeaderText="invoice_user" SortExpression="invoice_user"  meta:resourcekey="invoice_user" />
                                <asp:BoundField DataField="invoice_time" HeaderText="invoice_time" SortExpression="invoice_time"  meta:resourcekey="invoice_time" />

                                <asp:BoundField DataField="done_user" HeaderText="done_user" SortExpression="done_user"  meta:resourcekey="done_user" />
                                <asp:BoundField DataField="done_time" HeaderText="done_time" SortExpression="done_time"  meta:resourcekey="done_time" />
                            </Columns>
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#2461BF" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>

                        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                            SelectCommand="bll_tkt_get_root_info" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="hidOrderNo" Name="bk_id" PropertyName="Value" Type="Int64" />
                                <asp:ControlParameter ControlID="hidPaxSn" Name="pax_sn" PropertyName="Value" Type="Int16" />
                                <asp:SessionParameter Name="office" SessionField="OFFICE" Type="String" />
                                <asp:SessionParameter Name="office_type" SessionField="OFFICE_TYPE" Type="String" />
                                <asp:SessionParameter Name="user_airline" SessionField="AIRLINE" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>
                    <asp:Label ID="Label31" runat="server" Text="Tkt Statuses:"  meta:resourcekey="tkt_statuses"></asp:Label><br />
                    <asp:Label ID="Label22" runat="server" Text="AssistantNote" meta:resourcekey="AssistantNote"></asp:Label><br />
                    <asp:Label ID="Label33" runat="server" Text="MealNote" meta:resourcekey="MealNote"></asp:Label><br />

                    <div class="btn-group">
                        <asp:Button ID="btnOrder" runat="server" OnClick="btnOrder_Click" Text="Order..." meta:resourcekey="Order" CssClass="btn btn-sm btn-default"/>
                        <asp:Button ID="btnLogs" runat="server" meta:resourcekey="Logs" OnClick="btnLogs_Click" Text="Logs..." CssClass="btn btn-sm btn-default" />
                    </div>

                    <div class="well well-sm">
                        <asp:Label ID="Label278" runat="server" Text="Language:" meta:resourcekey="Language"></asp:Label>
                        <asp:DropDownList ID="lstLang" runat="server" DataSourceID="sqlLang" DataTextField="name" DataValueField="code" ondatabound="lstLang_DataBound" 
                            onselectedindexchanged="lstLang_SelectedIndexChanged">
                        </asp:DropDownList>
                        <asp:Button ID="btnReceipts" runat="server" meta:resourcekey="PrintItinerary" Text="Print Itinerary..." 
                            ToolTip="Please enable your browser popup window first!" CssClass="btn btn-sm btn-default" />

                        <asp:SqlDataSource ID="sqlLang" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" 
                            SelectCommand="bll_lang_get_codes" SelectCommandType="StoredProcedure">
                        </asp:SqlDataSource>
                    </div>

                    <div class="well well-sm">
                        <asp:Label ID="Label29" runat="server" Text="Cancel Responsibility:" meta:resourcekey="Responsibility"></asp:Label>
                        <asp:DropDownList ID="lstCancelType" runat="server">
                            <asp:ListItem Selected="True" Value="*" meta:resourcekey="Select" Text="Please Select..."></asp:ListItem>
                            <asp:ListItem Value="P" meta:resourcekey="Passenger" Text="Passenger"></asp:ListItem>
                            <asp:ListItem Value="A" meta:resourcekey="Airline2" Text="Airline"></asp:ListItem>
                            <asp:ListItem Value="T" meta:resourcekey="ThirdParty" Text="Third Party"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:Button ID="btnCancel" runat="server" meta:resourcekey="CancelTicket" OnClick="btnCancel_Click" Text="Cancel Ticket" CssClass="btn btn-sm btn-default" />
                        &nbsp;<asp:Button ID="btnRefund" runat="server" meta:resourcekey="RefundMoney" OnClick="btnRefund_Click" Text="Refund Money to Pax." CssClass="btn btn-sm btn-default" />
                    </div>

                    <div class="well well-sm">
                        <asp:Label ID="Label28" runat="server" Text="Invoice No.:"  meta:resourcekey="InvoiceNo"></asp:Label>
                        &nbsp;<asp:TextBox ID="txtInvoiceNo" runat="server"></asp:TextBox>
                        &nbsp;<asp:Button ID="btnIssueInvoice" runat="server" OnClick="btnIssueInvoice_Click" Text="Issue Invoice"  meta:resourcekey="IssueInvoice" CssClass="btn btn-sm btn-default"/>
                        <br />
                        <asp:Label ID="lblError2" runat="server" CssClass="ifdMessage"></asp:Label>
                    </div>

                    <div class="well well-sm">
                        <asp:CheckBox ID="chkChangePax" runat="server" AutoPostBack="True" OnCheckedChanged="chkChangePax_CheckedChanged" Text="Change PAX..." meta:resourcekey="ChgPax"/>
                        <asp:Panel ID="panChangePax" runat="server" Visible="False" Width="100%">
                        <asp:Label ID="Label11" runat="server" Text="Citizenship Name:" meta:resourcekey="CitizenshipName" Font-Bold="True"></asp:Label>
                        <div class="form-group">
                            <asp:Label ID="Label7" runat="server" Text="Family Name:" meta:resourcekey="FamilyName"></asp:Label>
                            <asp:TextBox ID="txtFamilyName" runat="server" Width="134px" BackColor="#FFFF99" MaxLength="16"></asp:TextBox>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label8" runat="server" Text="Name:" meta:resourcekey="Name"></asp:Label>
                            <asp:TextBox ID="txtName" runat="server" BackColor="#FFFF99" MaxLength="16"></asp:TextBox>
                        </div>
                        <br class="hidden-xs" />
                        <asp:Label ID="Label9" runat="server" Text="English Name:" meta:resourcekey="EnglishName" Font-Bold="True"></asp:Label>
                        <div class="form-group">
                            <asp:Label ID="Label10" runat="server" Text="Family Name:" meta:resourcekey="FamilyName"></asp:Label>
                            <asp:TextBox ID="txtFamilyNameEn" runat="server" Width="134px" BackColor="#FFFF99" MaxLength="20"></asp:TextBox>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label12" runat="server" Text="Name:" meta:resourcekey="Name"></asp:Label>
                            <asp:TextBox ID="txtNameEn" runat="server" BackColor="#FFFF99" MaxLength="20"></asp:TextBox>
                        </div>
                        <br class="hidden-xs" />
                        <div class="form-group">
                            <asp:Label ID="Label13" runat="server" Text="Gender:" meta:resourcekey="Gender"></asp:Label>
                            <asp:RadioButton ID="radMale" runat="server" Text="Male" GroupName="gender" meta:resourcekey="Male" BackColor="#FFFF99" />
                            <asp:RadioButton ID="radFemale" runat="server" Text="Female" GroupName="gender" meta:resourcekey="Female" BackColor="#FFFF99" /> 
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label14" runat="server" Text="Age Type:" meta:resourcekey="AgeType"></asp:Label>
                            <td><asp:DropDownList ID="lstAgeType" runat="server" onselectedindexchanged="lstAgeType_SelectedIndexChanged" AutoPostBack="True" BackColor="#FFFF99">
                            <asp:ListItem Selected="True" Value="A" meta:resourcekey="Adult">Adult</asp:ListItem>
                            <asp:ListItem Value="C" meta:resourcekey="Child">Child</asp:ListItem>
                            <asp:ListItem Value="I" meta:resourcekey="Infant">Infant</asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <asp:CheckBox ID="chkHoldInfant" runat="server" meta:resourcekey="HoldInfant" Text="Hold Infant_X" BackColor="#FFFF99" Visible="False" />
                        <div class="form-group">
                            <asp:Label ID="lblInfDob" runat="server" Text="Infant DOB:" meta:resourcekey="InfantDOB" Visible="False"></asp:Label>
                            <asp:TextBox ID="txtInfantDob" runat="server" Width="96px" Visible="False" BackColor="#FFFF99" MaxLength="15"></asp:TextBox></td>
                        </div>
                        <br class="hidden-xs" />
                        <div class="form-group">
                            <asp:Label ID="Label15" runat="server" Text="Nationality:" meta:resourcekey="Nationality"></asp:Label>
                            <asp:DropDownList ID="lstNations" runat="server" DataSourceID="sqlNations" DataTextField="name" DataValueField="code" BackColor="#FFFF99">
                            </asp:DropDownList>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label18" runat="server" Text="ID Type:" meta:resourcekey="IDType"></asp:Label>
                            <asp:DropDownList ID="lstIdTypes" runat="server" BackColor="#FFFF99">
                                <asp:ListItem Selected="True" Value="I"  meta:resourcekey="ID">ID</asp:ListItem>
                                <asp:ListItem Value="P"  meta:resourcekey="Passport">Passport</asp:ListItem>
                                <asp:ListItem Value="M"  meta:resourcekey="Military">Military</asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label16" runat="server" Text="ID No.:" meta:resourcekey="IDNo"></asp:Label>
                            <asp:TextBox ID="txtIdNo" runat="server" BackColor="#FFFF99"></asp:TextBox>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label17" runat="server" Text="Expriy:" meta:resourcekey="Expriy"></asp:Label>
                            <asp:TextBox ID="txtExpiry" runat="server" Width="97px" BackColor="#FFFF99" MaxLength="15"></asp:TextBox>
                        </div>
                        <br class="hidden-xs" />
                        <div class="form-group">
                            <asp:Label ID="Label20" runat="server" Text="Mobile Phone:" meta:resourcekey="Phone"></asp:Label>
                            <asp:TextBox ID="txtPhone" runat="server" Width="109px" MaxLength="16"></asp:TextBox>
                        </div>
                        <div class="form-group">
                            <td><asp:Label ID="Label23" runat="server" Text="E-mail:" meta:resourcekey="Email"></asp:Label>
                            <asp:TextBox ID="txtEmail" runat="server" MaxLength="20"></asp:TextBox>
                        </div>
                        <br class="hidden-xs" />
                        <div class="form-group">
                            <asp:Label ID="Label24" runat="server" Text="FFP Airline:" meta:resourcekey="FFPAirline"></asp:Label>
                            <asp:DropDownList ID="lstFfpAirlines" runat="server" DataSourceID="sqlAirlines" DataTextField="name" DataValueField="code">
                            </asp:DropDownList>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label25" runat="server" Text="FFP Number:" meta:resourcekey="FFPNumber"></asp:Label>
                            <asp:TextBox ID="txtFfpNo" runat="server" Width="130px" MaxLength="20"></asp:TextBox>
                        </div>
                        <div class="form-group">
                            <asp:Label ID="Label26" runat="server" Text="Pax Value:" meta:resourcekey="PaxValue"></asp:Label>
                            <asp:TextBox ID="txtPaxValue" runat="server" Text="-20000" Width="50px" MaxLength="6"></asp:TextBox>
                        </div>
                        <br class="hidden-xs" />
                        <asp:CheckBox ID="chkVip" runat="server" Text="VIP" />
                        <div class="form-group">
                            <asp:Label ID="Label34" runat="server" Text="Remark:" meta:resourcekey="Remark"></asp:Label>
                            <asp:TextBox ID="txtRemark" runat="server" Width="240px" MaxLength="50"></asp:TextBox>
                        </div>
                        <br class="hidden-xs" />
                        <asp:CheckBox ID="chkAloneChd" runat="server" Text="Unaccompanied Child" meta:resourcekey="AloneChd" />
                        <div class="form-group">
                            <asp:Label ID="Label35" runat="server" Text="Move Assistant:" meta:resourcekey="MoveAssistant"></asp:Label>
                            <asp:DropDownList ID="lstMoveAssistant" runat="server">
                                <asp:ListItem Value="-" meta:resourcekey="None">None</asp:ListItem>
                                <asp:ListItem Value="W" meta:resourcekey="WheelChair">Wheel Chair</asp:ListItem>
                                <asp:ListItem Value="S" meta:resourcekey="Stretcher">Stretcher</asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <div class="form-group">
                            <td><asp:Label ID="Label36" runat="server" Text="Favour Meal:" meta:resourcekey="FavourMeal"></asp:Label>
                            <asp:DropDownList ID="lstMeal" runat="server">
                                <asp:ListItem Selected="True" Value="*" meta:resourcekey="Voluntariness" Text="*-Voluntariness"></asp:ListItem>
                                <asp:ListItem Value="R" meta:resourcekey="RedMeat" Text="Red meat"></asp:ListItem>
                                <asp:ListItem Value="W" meta:resourcekey="WhiteMeat" Text="White meat"></asp:ListItem>
                                <asp:ListItem Value="S" meta:resourcekey="SeaFood" Text="Sea food"></asp:ListItem>
                                <asp:ListItem Value="V" meta:resourcekey="Vegetarianism" Text="Vegetarianism"></asp:ListItem>
                                <asp:ListItem Value="N" meta:resourcekey="Snack" Text="sNack"></asp:ListItem>
                                <asp:ListItem Value="I" meta:resourcekey="InfantMeal" Text="Infant meal"></asp:ListItem>
                                <asp:ListItem Value="M" meta:resourcekey="Muslim" Text="Muslim"></asp:ListItem>
                                <asp:ListItem Value="F" meta:resourcekey="SugarFree" Text="sugar-Free"></asp:ListItem>
                                <asp:ListItem Value="P" meta:resourcekey="SpoonMeal" Text="sPoon meal"></asp:ListItem>
                                <asp:ListItem Value="X" meta:resourcekey="NoMeal" Text="X-no meal"></asp:ListItem>
                            </asp:DropDownList>
                        </div>
                        <br class="hidden-xs" />
                        <asp:CheckBox ID="chkNeedInvoice" runat="server" Text="Need Invoice" meta:resourcekey="NeedInvoice" />
                        <div class="form-group">
                            <asp:Label ID="Label37" runat="server" Text="Mail Address:" meta:resourcekey="MailAddress"></asp:Label>
                            <asp:TextBox ID="txtMailAddress" runat="server" MaxLength="50" Width="240px"></asp:TextBox>
                        </div>
                        <div class="form-group">
                            <td><asp:Label ID="Label38" runat="server" Text="Post Code:" meta:resourcekey="PostCode"></asp:Label>
                            <asp:TextBox ID="txtPostCode" runat="server" MaxLength="6" Width="65px"></asp:TextBox>
                        </div>
                        <br class="hidden-xs" />

                        <asp:Button ID="btnChgPax" runat="server" Text="Change" meta:resourcekey="Change" OnClick="btnChgPax_Click" CssClass="btn btn-sm btn-default" ForeColor="Red" />
                        <asp:Label ID="Label272" runat="server" meta:resourcekey="ChangeNote" Text="ChangeNote"></asp:Label>
                        <asp:SqlDataSource ID="sqlNations" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                            DataSourceMode="DataReader" SelectCommand="bll_country_get_names_by_lang" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:SessionParameter Name="lang" SessionField="LANG" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="sqlAirlines" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                            DataSourceMode="DataReader" SelectCommand="bll_airline_get_names_by_lang" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:SessionParameter Name="lang" SessionField="LANG" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        </asp:Panel>
                    </div>

                    <div class="well well-sm invisible">
                        <asp:Label ID="Label30" runat="server" Text="Total Refund: _X" meta:resourcekey="TotalRefund" Visible="False" Enabled="False"></asp:Label>
                        <asp:TextBox ID="txtTotalRefund" runat="server" Width="90px" Visible="False" Enabled="False"></asp:TextBox>
                        <asp:Button ID="btnSetRefund" runat="server" OnClick="btnSetRefund_Click" Text="Set Total Refund_X"  meta:resourcekey="SetTotalRefund" Visible="False" Enabled="False"/>
                        <asp:Button ID="btnReject" runat="server" OnClick="btnReject_Click" Text="Reject Refund Request_X"  meta:resourcekey="RejectRefundRequest" Visible="False" Enabled="False" />
                    </div>

                </div>
            </div>
            </ContentTemplate></asp:UpdatePanel>

            <asp:UpdatePanel ID="UpdatePanel2" runat="server"><ContentTemplate>
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="secTripInfo"><asp:Literal ID="Literal2" runat="server" meta:resourcekey="TripInfo"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" style="min-width:2500px;width:100%;" class="table-hover"
                            DataKeyNames="bk_id,pax_sn,trip_sn" DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None">
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <RowStyle BackColor="#EFF3FB" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <input name="KEY" type="radio" value='<%#Eval("bk_id")+"|"+Eval("pax_sn")+"|"+Eval("trip_sn") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="trip_sn" HeaderText="trip_sn" SortExpression="trip_sn"  meta:resourcekey="trip_sn" />
                                <asp:TemplateField HeaderText="Flight" SortExpression="Flight" meta:resourcekey="flight1">
                                    <ItemTemplate>
                                        <%# Eval("airline") +""+ Eval("flt_no")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="flt_date" HeaderText="flt_date" SortExpression="flt_date"  meta:resourcekey="flt_date" DataFormatString="{0:d}" />
                                <asp:TemplateField HeaderText="City" SortExpression="City" meta:resourcekey="City1">
                                    <ItemTemplate>
                                        <%# Eval("ori_city") +"-"+ Eval("des_city")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Airport" SortExpression="Airport" meta:resourcekey="Airport1">
                                    <ItemTemplate>
                                        <%# Eval("ori_airport") +"-"+ Eval("des_airport")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="dep_time" HeaderText="dep_time" SortExpression="dep_time"  meta:resourcekey="dep_time" />
                                <asp:BoundField DataField="arr_time" HeaderText="arr_time" SortExpression="arr_time"  meta:resourcekey="arr_time" />
                                <asp:BoundField DataField="cabin" HeaderText="cabin" SortExpression="cabin"  meta:resourcekey="cabin1" />
                                <asp:BoundField DataField="class" HeaderText="class" SortExpression="class"  meta:resourcekey="class1" />
                                <asp:BoundField DataField="seat_status" HeaderText="seat_status" SortExpression="seat_status"  meta:resourcekey="seat_status" />
                                <asp:CheckBoxField DataField="virtual" HeaderText="virtual" SortExpression="virtual"  meta:resourcekey="virtual" />
                                <asp:TemplateField HeaderText="OpFlight" SortExpression="OpFlight" meta:resourcekey="OpFlight">
                                    <ItemTemplate>
                                        <%# Eval("op_airline") + ""+ Eval("op_flt_no")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="fare_code" HeaderText="fare_code" SortExpression="fare_code"  meta:resourcekey="fare_code" />
                                <asp:BoundField DataField="fare_currency" HeaderText="fare_currency" SortExpression="fare_currency"  meta:resourcekey="fare_currency" />
                                <asp:BoundField DataField="final_price" HeaderText="final_price" SortExpression="final_price"  meta:resourcekey="final_price" DataFormatString="{0:N}" />
                                <%--<asp:BoundField DataField="final_fuel" HeaderText="final_fuel" SortExpression="final_fuel"  meta:resourcekey="final_fuel" DataFormatString="{0:N}" />
                                <asp:BoundField DataField="final_taxes" HeaderText="final_taxes" SortExpression="final_taxes"  meta:resourcekey="final_taxes" DataFormatString="{0:N}" />--%>
                                <asp:BoundField DataField="final_surcharges" HeaderText="final_surcharges" SortExpression="final_surcharges"  meta:resourcekey="final_surcharges" DataFormatString="{0:N}" />
                                <asp:BoundField DataField="fare_roe" HeaderText="fare_roe" SortExpression="fare_roe"  meta:resourcekey="fare_roe" />
                                <asp:BoundField DataField="total_pay" HeaderText="total_pay" SortExpression="total_pay"  meta:resourcekey="total_pay" DataFormatString="{0:N}" />
                                <asp:BoundField DataField="refund_rule" HeaderText="refund_rule" SortExpression="refund_rule"  meta:resourcekey="refund_rule" />
                                <asp:BoundField DataField="dcs_status" HeaderText="dcs_status" SortExpression="dcs_status"  meta:resourcekey="dcs_status" />
                                <asp:TemplateField HeaderText="Seat" SortExpression="Seat" meta:resourcekey="Seat1">
                                    <ItemTemplate>
                                        <%# Eval("seat_row") +""+ Eval("seat_col")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Baggage" SortExpression="Baggage" meta:resourcekey="Baggage1">
                                    <ItemTemplate>
                                        <%# Eval("bag_count") +"/"+ Eval("bag_weight")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="dcs_user" HeaderText="dcs_user" SortExpression="dcs_user"  meta:resourcekey="dcs_user" />
                                <asp:BoundField DataField="dcs_time" HeaderText="dcs_time" SortExpression="dcs_time"  meta:resourcekey="dcs_time" />
                
                                <asp:BoundField DataField="cancel_type" HeaderText="cancel_type" SortExpression="cancel_type"  meta:resourcekey="cancel_type" />
                                <asp:BoundField DataField="cancel_time" HeaderText="cancel_time" SortExpression="cancel_time"  meta:resourcekey="cancel_time" />
                                <asp:BoundField DataField="cancel_user" HeaderText="cancel_user" SortExpression="cancel_user"  meta:resourcekey="cancel_user" />
                                <asp:BoundField DataField="cancel_office" HeaderText="cancel_office" SortExpression="cancel_office"  meta:resourcekey="cancel_office" />
                                <asp:BoundField DataField="cancel_airline" HeaderText="cancel_airline" SortExpression="cancel_airline"  meta:resourcekey="cancel_airline" />
                
                                <asp:BoundField DataField="refund_trip_fare" HeaderText="refund_trip_fare" SortExpression="refund_trip_fare"  meta:resourcekey="refund_trip_fare" DataFormatString="{0:N}" />
                                <asp:BoundField DataField="refund_mgr" HeaderText="refund_mgr" SortExpression="refund_mgr"  meta:resourcekey="refund_mgr" />
                                <asp:BoundField DataField="refund_user" HeaderText="refund_user" SortExpression="refund_user"  meta:resourcekey="refund_user" />
                                <asp:BoundField DataField="refund_time" HeaderText="refund_time" SortExpression="refund_time"  meta:resourcekey="refund_time" />
                
                                <asp:BoundField DataField="done_user" HeaderText="done_user" SortExpression="done_user"  meta:resourcekey="done_user" />
                                <asp:BoundField DataField="done_time" HeaderText="done_time" SortExpression="done_time"  meta:resourcekey="done_time" />
                            </Columns>
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#2461BF" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>

                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                            SelectCommand="bll_tkt_get_trips" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="hidOrderNo" Name="bk_id" PropertyName="Value" Type="Int64" />
                                <asp:ControlParameter ControlID="hidPaxSn" Name="pax_sn" PropertyName="Value" Type="Int16" />
                                <asp:SessionParameter Name="office" SessionField="OFFICE" Type="String" />
                                <asp:SessionParameter Name="office_type" SessionField="OFFICE_TYPE" Type="String" />
                                <asp:SessionParameter Name="user_airline" SessionField="AIRLINE" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>
                    <asp:Label ID="Label32" runat="server" Text="Trip Statuses:" meta:resourcekey="trip_statuses"></asp:Label><br />

                    <asp:Button ID="btnSelectSeat" runat="server" onclick="btnSelectSeat_Click" meta:resourcekey="SelectSeat" Text="Select Seat..." CssClass="btn btn-sm btn-default" />
                    <asp:Button ID="btnCancelOneProduct" runat="server" OnClick="btnCancelOneProduct_Click" Text="Cancel Product_X" meta:resourcekey="CancelProduct" Enabled="False" Visible="False" CssClass="btn btn-sm btn-default" />
                    <asp:Button ID="btnXferRollback" runat="server" CssClass="btn btn-sm btn-default" Enabled="False" Text="Rollback Transfer_X" Visible="False" />
                    <div class="table-responsive">
                        <asp:GridView ID="grdSurcharges" runat="server" AutoGenerateColumns="False" CellPadding="4" DataKeyNames="bk_id,pax_sn,trip_sn,surcharge_code" DataSourceID="sqlSurcharges" ForeColor="#333333" GridLines="None" style="min-width:700px;width:100%;" class="table-hover">
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:BoundField DataField="trip_sn" HeaderText="trip_sn" ReadOnly="True" SortExpression="trip_sn" meta:resourcekey="trip_sn" />
                                <asp:BoundField DataField="surcharge_code" HeaderText="surcharge_code" ReadOnly="True" SortExpression="surcharge_code" meta:resourcekey="surcharge_code" />
                                <asp:BoundField DataField="type" HeaderText="type" SortExpression="type" meta:resourcekey="surcharge_type" />
                                <asp:BoundField DataField="price" HeaderText="price" SortExpression="price" meta:resourcekey="surcharge_price" />
                                <asp:BoundField DataField="exch_rate" HeaderText="exch_rate" SortExpression="exch_rate" meta:resourcekey="exch_rate" />
                            </Columns>
                            <EditRowStyle BackColor="#2461BF" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EFF3FB" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>
                        <asp:SqlDataSource ID="sqlSurcharges" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                            SelectCommand="bll_tkt_get_trip_surcharges" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="hidOrderNo" Name="bk_id" PropertyName="Value" Type="Int64" />
                                <asp:ControlParameter ControlID="hidPaxSn" Name="pax_sn" PropertyName="Value" Type="Int16" />
                                <asp:SessionParameter Name="office" SessionField="OFFICE" Type="String" />
                                <asp:SessionParameter Name="office_type" SessionField="OFFICE_TYPE" Type="String" />
                                <asp:SessionParameter Name="user_airline" SessionField="AIRLINE" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>
                    <div class="well well-sm">
                        <asp:Label ID="Label19" runat="server" Text="Trip Refund: " meta:resourcekey="TripRefund"></asp:Label>
                        <asp:TextBox ID="txtRefundTktFare" runat="server" Width="97px"></asp:TextBox>
                        <asp:Button ID="btnSetRefundFare" runat="server" OnClick="btnSetRefundFare_Click" Text="Set Trip Refund Fare" meta:resourcekey="SetTripRefund" CssClass="btn btn-sm btn-default" />
                        <asp:Button ID="btnCloseRefund" runat="server" OnClick="btnCloseRefund_Click" Text="Accept & Close Refund Request" meta:resourcekey="AcceptCloseRefundRequest" CssClass="btn btn-sm btn-default" Enabled="False" Visible="False" />
                        <asp:Button ID="Button1" runat="server" CssClass="btn btn-sm btn-default" OnClick="btnReject_Click" Text="Reject Refund Request_X" meta:resourcekey="RejectRefundRequest" Enabled="False" Visible="False" />
                        <asp:Button ID="btnRefundQueue" runat="server" CssClass="btn btn-sm btn-default" Text="Return Refund Queue..._X" PostBackUrl="~/refund_queue2.aspx" meta:resourcekey="RefundQueue" Enabled="False" Visible="False" />
                    </div>

                    <div class="well well-sm">
                        <asp:Label ID="Label5" runat="server" Font-Bold="False" Text="Change Flight To:" meta:resourcekey="ChangeFlight"></asp:Label>
                        <br />
                        &nbsp;
                        <asp:TextBox ID="txtChgFlt" runat="server" Width="100%"></asp:TextBox>
                        <asp:CheckBox ID="chkForceTransfer" runat="server" Text="Force Change" meta:resourcekey="ForceTransfer" Enabled="False" />
                        <asp:Button ID="btnChgFlt" runat="server" OnClick="btnChgFlt_Click" Text="Change Flt." meta:resourcekey="ChgFlt" CssClass="btn btn-sm btn-default" /><br />
                        <asp:Label ID="Label6" runat="server" Text="Sample:1/3101/CAN/PEK/Y1/2009-9-9,2/3102/PEK/CAN/Y2/2009-9-10" meta:resourcekey="Sample"></asp:Label><br />
                        <asp:Label ID="lblError" runat="server" CssClass="ifdMessage"></asp:Label><br />
                    </div>
                    
                    <div class="well well-sm">
                        <asp:Label ID="Label27" runat="server" Text="OPEN Trip Date:" meta:resourcekey="OpenTripDate"></asp:Label>
                        <asp:TextBox ID="txtFltDate" runat="server" MaxLength="10" CssClass="form_date" Width="90"></asp:TextBox>
                        <asp:Button ID="btnBookFlt4OpenTrip" runat="server" meta:resourcekey="BookFlightForOpenTrip" Text="Book Flight..." onclick="btnBookFlt4OpenTrip_Click" CssClass="btn btn-sm btn-default" />
                    </div>

                    <div class="well well-sm invisible">
                        <asp:Label ID="Label21" runat="server" Font-Bold="False" Text="Transfer_X" meta:resourcekey="Transfer" Visible="False" Enabled="False"></asp:Label><br />
                        <asp:CheckBox ID="chkPaxPassive" runat="server" Checked="True" Text="Pax. Passive" Visible="False" Enabled="False" />
                        <asp:Label ID="Label2" runat="server" meta:resourcekey="Airline" Text="Airline:" Visible="False" Enabled="False"></asp:Label>
                        <asp:TextBox ID="txtX2Airline" runat="server" MaxLength="3" Width="36px" Visible="False" Enabled="False"></asp:TextBox>
                        <asp:Label ID="Label4" runat="server" meta:resourcekey="FlightNo" Text="Flight No.:" Visible="False" Enabled="False"></asp:Label>
                        <asp:TextBox ID="txtX2FltNo" runat="server" Width="67px" Visible="False" Enabled="False"></asp:TextBox>
                        <asp:Label ID="Label3" runat="server" meta:resourcekey="Date" Text="Date:" Visible="False" Enabled="False"></asp:Label>
                        <asp:TextBox ID="txtX2FltDate" runat="server" Width="90px" Visible="False" Enabled="False"></asp:TextBox>
                        <asp:Button ID="btnTransfer" runat="server" meta:resourcekey="TransferFlight" OnClick="btnTransfer_Click" Text="Transfer Flight_X" Visible="False" Enabled="False" />
                    </div>
                </div>
            </div>
            </ContentTemplate></asp:UpdatePanel>

            <asp:UpdatePanel ID="UpdatePanel3" runat="server"><ContentTemplate>
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="secValueAddedServices"><asp:Literal ID="Literal3" runat="server" meta:resourcekey="ValueAddedServices"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <asp:GridView ID="grdMerchandise" runat="server" CellPadding="4" ForeColor="#333333" style="min-width:1500px;width:100%;" class="table-hover"
                            GridLines="None" AutoGenerateColumns="False" DataSourceID="sqlEmdCart">
                            <RowStyle BackColor="#EFF3FB" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#2461BF" />
                            <AlternatingRowStyle BackColor="White" />
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <input name="emdKEY" type="radio" value='<%#Eval("bk_id")+"|"+Eval("pax_sn")+"|"+Eval("cart_time") %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="trip_sn" HeaderText="trip_sn" SortExpression="trip_sn" meta:resourcekey="trip_sn" />
                                <asp:TemplateField HeaderText="EMD ID" meta:resourcekey="EMD_ID">
                                    <ItemTemplate>
                                        <%# Eval("emd_airline") + "" + Eval("emd_id")%>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="emd_name" HeaderText="emd_name" SortExpression="emd_name" meta:resourcekey="emd_name" />
                                <asp:BoundField DataField="emd_note" HeaderText="emd_note" SortExpression="emd_note" meta:resourcekey="emd_note" />
                                <asp:BoundField DataField="currency" HeaderText="currency" SortExpression="currency" meta:resourcekey="currency1" />
                                <asp:BoundField DataField="price" HeaderText="price" SortExpression="price" meta:resourcekey="price1" DataFormatString="{0:N}" />
                                <asp:BoundField DataField="quantity" HeaderText="quantity" SortExpression="quantity" meta:resourcekey="quantity1" />
                                <asp:BoundField DataField="remark" HeaderText="remark" SortExpression="remark" meta:resourcekey="remark1" />
                                <asp:BoundField DataField="status" HeaderText="status" SortExpression="status" meta:resourcekey="status1" />
                                <asp:BoundField DataField="pay_currency" HeaderText="pay_currency" SortExpression="pay_currency" meta:resourcekey="pay_currency" />
                                <asp:BoundField DataField="exch_rate" HeaderText="exch_rate" SortExpression="exch_rate" meta:resourcekey="exch_rate" />
                                <asp:BoundField DataField="pay_total" HeaderText="pay_total" SortExpression="pay_total" meta:resourcekey="pay_total" DataFormatString="{0:N}" />
                                <asp:BoundField DataField="sell_airline" HeaderText="sell_airline" SortExpression="sell_airline" meta:resourcekey="sell_airline" />
                                <asp:BoundField DataField="sell_office" HeaderText="sell_office" SortExpression="sell_office" meta:resourcekey="sell_office" />
                                <asp:BoundField DataField="sell_user" HeaderText="sell_user" SortExpression="sell_user" meta:resourcekey="sell_user" />
                                <asp:BoundField DataField="refund_time" HeaderText="refund_time" SortExpression="refund_time" meta:resourcekey="refund_time" />
                                <asp:BoundField DataField="refund_airline" HeaderText="refund_airline" SortExpression="refund_airline" meta:resourcekey="refund_airline" />
                                <asp:BoundField DataField="refund_office" HeaderText="refund_office" SortExpression="refund_office" meta:resourcekey="refund_office" />
                                <asp:BoundField DataField="refund_user" HeaderText="refund_user" SortExpression="refund_user" meta:resourcekey="refund_user" />
                                <asp:BoundField DataField="done_user" HeaderText="done_user" SortExpression="done_user" meta:resourcekey="done_user" />
                                <asp:BoundField DataField="done_time" HeaderText="done_time" SortExpression="done_time" meta:resourcekey="done_time" />
                            </Columns>
                        </asp:GridView>

                        <asp:SqlDataSource ID="sqlEmdCart" runat="server"  DataSourceMode="DataReader" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" 
                            SelectCommand="bll_tkt_get_emd_info" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="hidOrderNo3" Name="bk_id" PropertyName="Value" Type="Int64" />
                                <asp:ControlParameter ControlID="hidPaxSn3" Name="pax_sn" PropertyName="Value" Type="Int16" />
                                <asp:SessionParameter Name="lang" SessionField="LANG" Type="Int16" />
                                <asp:SessionParameter Name="user" SessionField="USER" Type="String" />
                                <asp:SessionParameter Name="office" SessionField="OFFICE" Type="String" />
                                <asp:SessionParameter Name="office_type" SessionField="OFFICE_TYPE" Type="String" />
                                <asp:SessionParameter Name="user_airline" SessionField="AIRLINE" Type="String" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>

                    <div class="btn-group">
                        <asp:Button ID="Button2" runat="server" onclick="btnRefreshEMD" meta:resourcekey="Refresh" Text="Refresh" CssClass="btn btn-sm btn-default" />
                        <asp:Button ID="btnRemoveFromCart" runat="server" Text="Remove from Cart" CssClass="btn btn-sm btn-default" onclick="btnRemoveFromCart_Click"  meta:resourcekey="RemoveFromCart"/>
                        <asp:Button ID="btnUse" runat="server" onclick="btnUse_Click" Text="Use !"  meta:resourcekey="Use" CssClass="btn btn-sm btn-default" />
                        <asp:Button ID="btnCancelEmd" runat="server" Text="Cancel !" onclick="btnCancelEmd_Click" meta:resourcekey="Cancel" CssClass="btn btn-sm btn-default" />
                        <asp:Button ID="btnRefundEmd" runat="server" Text="Refund !" CssClass="btn btn-sm btn-default" onclick="btnRefundEmd_Click" meta:resourcekey="Refund" />
                    </div>

                    <div class="well well-sm">
                        <asp:Label ID="Label277" runat="server" Text="Segment No.: " meta:resourcekey="SegNo"></asp:Label>
                        <asp:DropDownList ID="lstTripSn" runat="server" AutoPostBack="True" 
                            DataSourceID="sqlTripSn" DataTextField="trip_sn" DataValueField="trip_sn" 
                            onselectedindexchanged="lstTripSn_SelectedIndexChanged">
                        </asp:DropDownList>
                        <asp:Label ID="Label40" runat="server" Text="Merchandise:" meta:resourcekey="Merchandise"></asp:Label>&nbsp;
                        <asp:DropDownList ID="lstEmdID" runat="server" DataSourceID="sqlEmdIDs" DataTextField="name" DataValueField="id">
                        </asp:DropDownList>
                        <asp:Button ID="btnRetreiveMerchan" runat="server" Text="Retreive" OnClick="btnRetreiveMerchan_Click" meta:resourcekey="Retreive" CssClass="btn btn-sm btn-default" />
                        <br />
                        <asp:Label ID="Label46" runat="server" Text="Price:" meta:resourcekey="Price"></asp:Label>
                        <asp:Label ID="lblCurrency" runat="server"></asp:Label>
                        <asp:Label ID="lblPrice" runat="server"></asp:Label>/<asp:Label ID="lblUnit" runat="server"></asp:Label>
                        <br />
                        <asp:Label ID="Label43" runat="server" Text="Note:" meta:resourcekey="Note"></asp:Label><br />
                        <asp:TextBox ID="txtEmdNote" runat="server" Height="48px" ReadOnly="True" TextMode="MultiLine" BackColor="#E0E0E0" Width="100%"></asp:TextBox><br />
                        <br /><br />
                        <asp:Label ID="Label276" runat="server" Text="Associated Seg.:" meta:resourcekey="AssociatedSeg"></asp:Label>
                        &nbsp;<asp:DropDownList ID="lstAssociatedSeg" runat="server">
                            <asp:ListItem Selected="True">0</asp:ListItem>
                            <asp:ListItem>1</asp:ListItem>
                            <asp:ListItem>2</asp:ListItem>
                            <asp:ListItem>3</asp:ListItem>
                            <asp:ListItem>4</asp:ListItem>
                        </asp:DropDownList>
                        &nbsp;<asp:Label ID="Label44" runat="server" Text="Quantity:" meta:resourcekey="Quantity"></asp:Label>
                        <asp:TextBox ID="txtQuantity" runat="server" Width="49px">1.0</asp:TextBox><br />
                        <asp:Label ID="Label275" runat="server" Text="Remark:" meta:resourcekey="Remark"></asp:Label>
                        <asp:TextBox ID="txtEmdRemark" runat="server" MaxLength="50" Width="100%"></asp:TextBox><br />
                        <asp:Button ID="BtnAddToCart" runat="server" Text="Add to Cart"  meta:resourcekey="AddToCart" onclick="BtnAddToCart_Click" CssClass="btn btn-sm btn-default" />
                    </div>

                    <div class="well well-sm">
                        <div class="form-group">
                        <asp:Label ID="Label274" runat="server" Text="Pay Currency:" meta:resourcekey="PayCurrency"></asp:Label>
                        <asp:DropDownList ID="lstPayCurrencies" runat="server" 
                            DataSourceID="sqlCurrencies" DataTextField="name" DataValueField="code">
                        </asp:DropDownList>
                        <asp:Button ID="btnCalculate" runat="server" onclick="btnCalculate_Click" meta:resourcekey="Calculate" Text="Calculate" CssClass="btn btn-sm btn-default" />
                        </div>
                        <div class="form-group">
                        <asp:Label ID="Label273" runat="server" Text="Total:" meta:resourcekey="Total"></asp:Label>
                        <asp:Label ID="lblEmdTotal" runat="server" Text="?" Font-Bold="True"></asp:Label>
                        &nbsp;<asp:Button ID="btnPayEmd" runat="server" Text="Pay !"  meta:resourcekey="Pay" OnClick="btnPayEmd_Click" CssClass="btn btn-sm btn-default" />
                        </div>
                        <asp:Label ID="lblEmdError" runat="server" CssClass="ifdMessage"></asp:Label>

                        <asp:HiddenField ID="hidOrderNo3" runat="server" />
                        <asp:HiddenField ID="hidPaxSn3" runat="server" />
                        <asp:SqlDataSource ID="sqlEmdIDs" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" DataSourceMode="DataReader"
                            SelectCommand="bll_tkt_get_avail_emd_names_by_trip" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="hidOrderNo3" Name="bk_id" PropertyName="Value" Type="Int64" />
                                <asp:ControlParameter ControlID="hidPaxSn3" Name="pax_sn" PropertyName="Value" Type="Int16" />
                                <asp:ControlParameter ControlID="lstTripSn" Name="trip_sn" PropertyName="SelectedValue" Type="Byte" />
                                <asp:SessionParameter Name="lang" SessionField="LANG" Type="Int16" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="sqlCurrencies" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" DataSourceMode="DataReader"
                            SelectCommand="bll_currency_get_names_by_lang" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:SessionParameter Name="lang" SessionField="LANG" Type="Byte" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                        <asp:SqlDataSource ID="sqlTripSn" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>" 
                            SelectCommand="bll_tkt_get_trip_sn" SelectCommandType="StoredProcedure">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="hidOrderNo3" Name="bk_id" PropertyName="Value" Type="Int64" />
                                <asp:ControlParameter ControlID="hidPaxSn3" Name="pax_sn" PropertyName="Value" Type="Int16" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>
                </div>
            </div>
            </ContentTemplate></asp:UpdatePanel>

            <asp:UpdatePanel ID="UpdatePanel4" runat="server"><ContentTemplate>
            <div class="panel">
                <div class="panel-heading btn-primary">
                    <h6 class="panel-title" id="secNotes"><asp:Literal ID="Literal4" runat="server" meta:resourcekey="Notes"></asp:Literal></h6>
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" CellPadding="4"
                            DataSourceID="sqlNotes" ForeColor="#333333" GridLines="None" style="min-width:500px;width:100%;" class="table-hover">
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <RowStyle BackColor="#EFF3FB" />
                            <Columns>
                                <asp:BoundField DataField="note" HeaderText="note" SortExpression="note" meta:resourcekey="note1"/>
                                <asp:BoundField DataField="done_user" HeaderText="done_user" SortExpression="done_user" meta:resourcekey="done_user"/>
                                <asp:BoundField DataField="done_time" HeaderText="done_time" SortExpression="done_time" meta:resourcekey="done_time"/>
                            </Columns>
                            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <EditRowStyle BackColor="#2461BF" />
                            <AlternatingRowStyle BackColor="White" />
                        </asp:GridView>

                        <asp:SqlDataSource ID="sqlNotes" runat="server" ConnectionString="<%$ ConnectionStrings:IFD_DB %>"
                            SelectCommand="bll_tkt_get_notes" SelectCommandType="StoredProcedure" DataSourceMode="DataReader">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="hidOrderNo2" Name="bk_id" PropertyName="Value" Type="Int64" />
                                <asp:ControlParameter ControlID="hidPaxSn2" Name="pax_sn" PropertyName="Value" Type="Int16" />
                            </SelectParameters>
                        </asp:SqlDataSource>
                    </div>
                    <asp:Button ID="btnRefreshNotes" runat="server" Text="Refresh" OnClick="btnRefreshNotes_Click"  meta:resourcekey="Refresh" CssClass="btn btn-sm btn-default"/>

                    <div class="well well-sm">
                        <asp:Label ID="Label271" runat="server" Text="New Note:" meta:resourcekey="NewNote"></asp:Label>
                        <asp:TextBox ID="txtNewNote" runat="server" MaxLength="50" Width="100%"></asp:TextBox>
                        <asp:Button ID="btnAddNote" runat="server" Text="Add" OnClick="btnAddNote_Click" meta:resourcekey="AddNewNote" CssClass="btn btn-sm btn-default" />
                        <br />

                        <asp:HiddenField ID="hidOrderNo2" runat="server" />
                        <asp:HiddenField ID="hidPaxSn2" runat="server" />
                    </div>
                </div>
            </div>
            </ContentTemplate></asp:UpdatePanel>

        </div>
    </div>

    </div>
    <%--</ContentTemplate></asp:UpdatePanel>--%>
    </form>

    <script src="Datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script>
        $(document).ready(function () {
            //$('.form_datetime').datetimepicker({
            //    format: 'yyyy-m-d hh:ii',
            //    weekStart: 1,
            //    todayBtn: 1,
            //    autoclose: 1,
            //    todayHighlight: 1,
            //    startView: 'month',
            //    forceParse: 0,
            //    showMeridian: 0
            //});
            $('.form_date').datetimepicker({
                format: 'yyyy-m-d',
                weekStart: 1,
                todayBtn: 1,
                autoclose: 1,
                todayHighlight: 1,
                startView: 'month',
                minView: 'month',
                forceParse: 0
            });
            //$('.form_time').datetimepicker({
            //    format: 'hh:ii' ,
            //    weekStart: 1,
            //    todayBtn:  1,
            //    autoclose: 1,
            //    todayHighlight: 1,
            //    startView: 'day',
            //    minView: 'hour',
            //    maxView: 'day',
            //    forceParse: 0
            //});
       });
  	</script>

</asp:Content>
